package com.suse.ecommerce.serviceImp;

import com.suse.ecommerce.dao.OrderProductMapper;
import com.suse.ecommerce.pojo.OrderProduct;
import com.suse.ecommerce.service.OrderItemService;
import com.suse.ecommerce.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderItemServiceImpl implements OrderItemService {
    @Autowired
    private OrderProductMapper orderProductMapper;

    @Override
    public void addOrderItems(OrderProduct orderProduct) {
        orderProductMapper.insertSelective(orderProduct);
    }

    @Override
    public List<OrderProduct> queryOrderProducts(OrderProduct orderProduct) {
        List<OrderProduct> list = orderProductMapper.queryOrderProducts(orderProduct);
        return list;
    }
}
